package com.shrct.businessprocess.budget;

import com.shrct.businessprocess.budget.BudgetType;
import com.shrct.businessprocess.budget.RCBudgetCategory;
import com.shrct.businessprocess.budget.RCBudgetDivision;
import com.shrct.businessprocess.budget.RCBudgetTaskStatus;
import com.shrct.businessprocess.budget.RCCost4RemainItem;
import com.shrct.businessprocess.budget.RCCostBreakDown;
import com.shrct.businessprocess.budget.impl.RCBudgetImpl;
import com.shrct.businessprocess.budget.proxy.RCBudgetProxy;
import com.shrct.businessprocess.diagnose.ICanDiagnose;
import com.shrct.businessprocess.diagnose.IDiagnoseAcceptor;
import com.shrct.businessprocess.project.RCExchangeRate;
import com.shrct.businessprocess.project.RCProjectMoney;
import com.shrct.businessprocess.project.RCRealMoney;
import com.shrct.businessprocess.purchase.RCBudgetContract;
import com.shrct.businessprocess.purchase.RCPay;
import com.shrct.businessprocess.purchase.RCPayRequest;
import edu.fudan.mylang.pf.EntityImplementation;
import edu.fudan.mylang.pf.IModelObject;
import edu.fudan.mylang.pf.INamedModelObject;
import java.util.Collection;
import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;

@EntityImplementation(implementBy = RCBudgetImpl.class)
public interface RCBudget extends IModelObject, INamedModelObject, ICanDiagnose {
  public abstract RCCostBreakDown getCbd();
  
  public abstract RCBudget setCbd(final RCCostBreakDown cbd);
  
  public abstract String getComment();
  
  public abstract RCBudget setComment(final String comment);
  
  public abstract Collection<RCBudgetContract> getContracts();
  
  public abstract RCBudgetContract createAndAddtoContracts();
  
  public abstract RCBudgetContract createAndAddtoContracts(final Procedure1<RCBudgetContract> updater);
  
  public abstract RCBudget removeFromContracts(final RCBudgetContract rCBudgetContract);
  
  public abstract RCBudget removeAllContracts();
  
  public abstract String getEntityName();
  
  public abstract RCBudgetCategory getCategory();
  
  public abstract RCProjectMoney getContractPrice();
  
  public abstract Double getContractTaxRate();
  
  public abstract RCProjectMoney getNetPrice();
  
  public abstract Double getNetTaxRate();
  
  public abstract Double getRemainAmount();
  
  public abstract String getSortKey();
  
  public abstract BudgetType getBudgetType();
  
  public abstract String getTypeId();
  
  public abstract Collection<RCBudgetDivision> getBudgetDivisions();
  
  /**
   * 毛利率,可能为0(0的意义是什么?)
   */
  public abstract Double getGrossProfit();
  
  /**
   * 根据实际合同计算的销售净价
   */
  public abstract RCProjectMoney getActualContractPrice();
  
  /**
   * 根据实际合同计算的毛利率
   */
  public abstract Double getActualGrossProfit();
  
  public abstract Collection<? extends RCPayRequest> getAllPayRequests();
  
  public abstract Collection<RCPay> getAllPays();
  
  public abstract RCRealMoney getTotalPaiedAmount();
  
  public abstract RCProjectMoney getTotalPayRequestedAmount();
  
  /**
   * 计算合同总金额
   */
  public abstract RCProjectMoney getTotalRequiredAmount();
  
  public abstract Iterable<RCCost4RemainItem> getRCCost4RemainItems();
  
  /**
   * 在此预算项目上的已发生成本
   */
  public abstract RCProjectMoney getActualCostAmount();
  
  /**
   * 判断该预算项目作为任务计划是否已经执行完毕
   */
  public abstract Boolean seemsFinished();
  
  public abstract RCBudgetTaskStatus getBudgetTaskStatus();
  
  /**
   * 判断该预算项目在计算ActualCost时，应该使用实际支出还是预算支出
   */
  public abstract boolean shouldUseRealActualCost();
  
  /**
   * 获取到当前为止该项目的预期总开销
   */
  public abstract RCProjectMoney getExpectedCostAmount(final Double percent);
  
  public abstract RCExchangeRate getDefaultContractExchangeRate();
  
  public abstract RCProjectMoney getZeroAmount(final RCExchangeRate exchangeRage);
  
  public abstract void diagnose(final IDiagnoseAcceptor acceptor);
  
  /**
   * 获取累计进项税
   */
  public abstract RCProjectMoney getContractInvoiceTax();
  
  public abstract RCProjectMoney getNetInvoiceTax();
  
  /**
   * 销售发票税
   */
  public abstract RCProjectMoney getInvoiceTax();
  
  public abstract RCBudgetProxy toProxy();
}
